#ifndef MANGOS_PETAI_H
#define MANGOS_PETAI_H

#include "CreatureAI.h"
#include "Timer.h"

class Creature;
class Spell;

class MANGOS_DLL_DECL PetAI : public CreatureAI
{
public:
    explicit PetAI(Creature *c);


    void MoveInLineOfSight(Unit *);
    void AttackStart(Unit *);
    void EnterEvadeMode();
    void AttackedBy(Unit*);
    bool IsVisible(Unit *) const;

    void UpdateAI(const uint32);
    static int Permissible(const Creature *);

private:
    bool _isVisible(Unit *) const;
    bool _needToStop(void) const;
    void _stopAttack(void);

    void UpdateAllies();

    TimeTracker i_tracker;
    bool inCombat;
    std::set<uint64> m_AllySet;
    uint32 m_updateAlliesTimer;
};
#endif
